package Test5;

import java.util.HashSet;

public class Student_test {
    public static void main(String[] args) {
        HashSet<Student> students = new HashSet<>();
        Student s = new Student("张三", "男", 20);
        Student s1 = new Student("李四", "女", 21);
        Student s2 = new Student("张三", "男", 20);
        students.add(s);
        students.add(s1);
        students.add(s2);
        for (Student student : students) {
            System.out.println(student);

        }
    }
}
